package cn.hiema;

/*

    增加属性：
			单位unit、工龄workAge；
		重写工作方法（工人的工作是盖房子）。
 */

public class Worker extends Person{

    private String unit;

    private String workAge;

    @Override
    public void work() {

        System.out.println(getName()+"的工作是盖房子");
    }

    public Worker(String unit, String workAge) {
        this.unit = unit;
        this.workAge = workAge;
    }

    public Worker(String name, String gender, String age, String nationality, String unit, String workAge) {
        super(name, gender, age, nationality);
        this.unit = unit;
        this.workAge = workAge;
    }

    public Worker() {
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getWorkAge() {
        return workAge;
    }

    public void setWorkAge(String workAge) {
        this.workAge = workAge;
    }
}
